<h1><?php echo $title;?></h1><br>
<p><?php echo anchor("cstudresult/create", '<button class="btn" type="button">Add new Student Result</button>');?></p><br>
<?php
if ($this->session->flashdata('message')){
	echo "<div class='message'>".$this->session->flashdata('message')."</div>";
}

if (count($studresults)){
	echo '<table cellpadding="0" cellspacing="0" border="0" class="bordered-table zebra-striped" id="example">';
	echo "<thead>\n<tr valign='top'>\n";
	echo "<th>No</th>\n<th>Result Title</th><th>Image</th><th>Semester</th><th>Shift</th><th>Group</th><th>Batch</th><th>Year</th><th>Activate</th><th>Actions</th>\n";
	echo "</tr>\n</thead>\n<tbody>\n";
	$i = 1;
	foreach ($studresults as $key => $list){
		echo "<tr valign='top'>\n";
		echo "<td align='center'>".$i++."</td>\n";
		echo "<td align='center'>".$list['result_type']."</td>\n";
		echo "<td align='center'><img title='view image' class='img-popup' style='style:width:80px; height:80px;'  src=".base_url().'images/studresult/'.$list['result_src']." /></td>\n";
		echo "<td align='center'>".$list['semester']."</td>\n";
		echo "<td align='center'>".$list['title']."</td>\n";
		echo "<td align='center'>".$list['group']."</td>\n";
		echo "<td align='center'>".$list['batch']."</td>\n";
		echo "<td align='center'>".$list['year']."</td>\n";
		
		if($list['activate']==1) 
			$activate = 'active';
		else 
			$activate = 'inactive';
			
		echo "<td align='center'>". $activate."</td>\n";
		echo "<td align='center'>";
		echo anchor('cstudresult/edit/'.$list['student_result_id'],'edit');
		echo " | ";
		echo anchor('cstudresult/delete/'.$list['student_result_id'],'delete',array('class'=>'delete-item'));
		echo "</td>\n";
		echo "</tr>\n";
	}
	echo "</tbody>\n</table>";
}
?>